A system may include a plurality of computers coupled via a network. Each computer may include one or more physical network adapters each of which may be adapted to receive data from the network and transmit data to the network. Further, each computer may execute software that provides one or more virtual adapters. A virtual adapter is a software-based network adapter that actually uses a physical adapter to receive data from the network in the computer and to transmit data from the computer to the network. Before the virtual adapter of a computer may be brought on-line (e.g., into a connected state), the virtual adapter must be configured. More specifically, a physical adapter local to the computer including the virtual adapter should be selected from which the virtual adapter may transmit data from and receive data in the computer. Further, a physical adapter in a remote computer to be accessed over the network by the virtual adapter may be specified. For example, the remote physical adapter may be specified by a user.
However, selecting a physical adapter from a plurality of physical adapters local to a computer for a virtual adapter to use may be problematic. Many times the physical adapter selected for the virtual adapter to employ to transmit data from and receive data in the computer may not be the best choice. For example, according to a first method to select a local physical adapter for a virtual adapter, a computer may serially test a local plurality of physical adapters for physical connectivity to the selected remote physical adapter, and select the first local physical adapter that is determined to be physically connected to the selected remote physical adapter. However, this method may be time consuming (e.g., if the first one or two local physical adapters tested are not physically connected to the selected remote physical adapter, because typical implementation involves a protocol timeout).
According to a second method to select a local physical adapter for a virtual adapter, a computer may simultaneously test a plurality of local physical adapters for connectivity to the selected remote physical adapter, and select the first local physical adapter that passes the test. However, such a method may result in an unbalanced distribution of physical adapter usage by virtual adapters in the computer.
According to a third method to select a local physical adapter for a virtual adapter, a local physical adapter may be manually configured (e.g., selected by a user). However, this method may be time consuming because a user must configure a local physical adapter for each virtual adapter of the computer. Additionally, such method requires the user be knowledgeable about the configuration and topology of the system network. Additionally, the method may be prone to user errors (e.g., inadvertent typographical error during configuration and/or inadvertent selection by the user of a local physical adapter that is not connected to the remote physical adapter).
According to a fourth method, a local physical adapter for a virtual adapter may be randomly selected (e.g., by the computer). However, the randomly-selected local physical adapter may not be physically connected to the remote physical adapter. Additionally, the randomly-selected physical adapter may result in an unbalanced distribution of physical adapter usage by virtual adapters in the computer.
Thus, the above-described methods of selecting a local physical adapter for a virtual adapter all have disadvantages and may not result in selection of the most appropriate physical adapter for the virtual adapter. Accordingly, improved methods and apparatus for assigning a local physical adapter to a virtual adapter of a computer are desired.